load("//bzl:cpp_library.bzl", "cpp_library")

package(default_visibility = ["//visibility:public"])

cpp_library(
    name = "settings",
    srcs = [
        "Settings.cpp",
    ],
    hdrs = [
        "Settings.h",
        "detail/SettingsImpl.h",
    ],
    deps = [
        ":immutables",
        ":types",
        "//folly:conv",
        "//folly:function",
        "//folly:likely",
        "//folly:optional",
        "//folly:range",
        "//folly:shared_mutex",
        "//folly:synchronized",
        "//folly:thread_local",
        "//folly:utility",
        "//folly/concurrency:singleton_relaxed_counter",
        "//folly/container:f14_hash",
        "//folly/lang:aligned",
    ],
)

cpp_library(
    name = "observer",
    hdrs = [
        "Observer.h",
    ],
    deps = [
        ":settings",
        "//folly/observer",
        "//folly/observer:simple_observable",
    ],
)

cpp_library(
    name = "types",
    srcs = [
        "Types.cpp",
    ],
    hdrs = [
        "Types.h",
    ],
    deps = [
        "//folly:conv",
        "//folly:expected",
        "//folly:range",
        "//folly:unit",
        "//folly:utility",
    ],
)

cpp_library(
    name = "immutables",
    srcs = [
        "Immutables.cpp",
    ],
    hdrs = [
        "Immutables.h",
    ],
    deps = [
        "//folly:indestructible",
        "//folly:synchronized",
        "//folly/container:f14_hash",
    ],
)
